﻿@inherits BootComponentBase

<div id="@Id" class="modal fade @(IsShown?"show":"hide")" tabindex="-1" role="dialog" style="@(IsShown?"display:block":"")">
    <div style="@BuildStylesString()" class="modal-dialog @(BuildCssClassString())" role="document" @attributes="AdditionalAttributes">
        <div class="modal-content">
            @if (HeadTemplate != null)
            {
                <div class="modal-header">
                    <div class="modal-title">@HeadTemplate</div>

                    @if (Closable)
                    {
                        <button type="button" class="close" @onclick="@(() => Hide())">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    }
                </div>
            }
            @if (BodyTemplate != null)
            {
                <div class="modal-body">
                    @BodyTemplate
                </div>
            }
            @if (FootTemplate != null)
            {
                <div class="modal-footer">
                    @FootTemplate
                </div>
            }
        </div>
    </div>
</div>
@if (IsShown)
{
    <div class="modal-backdrop show fade"></div>
}